package com.nefu.softlab.xjwc.service;

import com.nefu.softlab.xjwc.utils.XJWCException;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @author LiXiwen
 * @date 2020/4/15 15:06
 */
public interface ExportExcelService {

    /**
     * 生成 项目分数 汇总 Excel表格
     * @param projectId
     * @return
     */
    String exportTotalProjectExcelByProjectId(Integer projectId, HttpServletResponse response, HttpServletRequest request);

    /**
     * 下载 项目分数 汇总 Excel表格
     * @param projectId
     * @return
     */
    String downloadTotalProjectExcelByProjectId(Integer projectId, HttpServletResponse response, HttpServletRequest request) throws XJWCException;

    /**
     * 上传Excel模板
     * @param files
     * @return
     */
    String uploadExcelModel(MultipartFile[] files);

    /**
     * 获取所有Excel模板 名字
     * @return
     */
    List<String> getExcelModels();

    /**
     * 对于每个专家评的当前项目，生成excel
     * @param projectId
     * @param userId
     * @param response
     * @param request
     * @return
     */
    String exportExcelByUserIdAndProId(Integer projectId, String userId, HttpServletResponse response, HttpServletRequest request);

    /**
     * 导出活动下面所有项目的汇总表
     * @param activityId
     * @param response
     * @param request
     * @return
     */
    String exportExcelByActivityId(Integer activityId, HttpServletResponse response, HttpServletRequest request) throws XJWCException;
}